package org.zbclan.bf2.rcon.event;

import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;

public class RunAppletEvent extends GwtEvent<RunAppletEvent.Handler> {

	public interface Handler extends EventHandler {

		Type<Handler> TYPE = new Type<Handler>();

		void onEvent(RunAppletEvent event);
	}

	private final String[] params;

	public RunAppletEvent(String... params) {
		this.params = params;
	}

	@Override
	public Type<Handler> getAssociatedType() {
		return Handler.TYPE;
	}

	@Override
	protected void dispatch(Handler handler) {
		handler.onEvent(this);
	}

	public String[] getParams() {
		return params;
	}
}
